SET NOCOUNT OFF
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
SET ARITHABORT ON
SET CONCAT_NULL_YIELDS_NULL ON
SET QUOTED_IDENTIFIER ON
SET NUMERIC_ROUNDABORT OFF
GO

/******************************************************************************/
/* Step 1. Remove stored procedure if it already exists                       */
/******************************************************************************/
IF (SELECT OBJECT_ID('[NoteManagement].[NotesForServiceMember]')) IS NOT NULL
BEGIN
  DROP PROCEDURE [NoteManagement].[NotesForServiceMember]
END

GO

/*****************************************************************************/
/* Stored Procedure :: LogException()                                        */
/*****************************************************************************/
/* Copyright (C) 2003, Perot Systems Corporation. All right reserved.        */
/* Developer: Dmitry Frenkel (dima.frenkel@ps.net)                           */
/* Started:  07/07/2003                                                      */
/*****************************************************************************/
CREATE PROCEDURE [NoteManagement].[NotesForServiceMember]( @ServiceMemberID BIGINT )
AS  
BEGIN

Select 
	*
	From dbo.ServiceManNotes
	Where ServiceManID = @ServiceMemberID

END 
GO

/******************************************************************************/
/* Step 3. Assign appropriate permissions                                     */
/******************************************************************************/
GRANT EXECUTE ON [NoteManagement].[NotesForServiceMember] TO [Liberty_Users]
GO
-- Developers and Admins have permissions to execute through membership   